package config

import (
	"gitee.com/crack007/goose/config"
)

type EtcdConfig struct {
	Endpoints   []string
	Dialtimeout int
}
type nodeConfig struct {
	NodeName string
	NodeAddr string
	NodePort uint16
	Timeout  uint32 // 超时时间(毫秒)
}
type RabbitmqConfig struct {
	User     string
	Password string
	Host     string
	Port     int
	Vhost    string
}
type SnowflakeConfig struct {
	DataCenterId int64
	WorkerId     int64
}
type wsConfig struct {
	IdleTimeout   uint
	IdleCount     uint
	MsgType       int
	GrpcPort      uint16
	PushQueueSize uint
}
type grpcConfig struct {
	Port uint16
}

func GetEtcdConfig() *EtcdConfig {
	return etcdConfig
}

func GetNodeConfig() *nodeConfig {
	return NodeConfig
}

func GetSnowflakeConfig() *SnowflakeConfig {
	return snowflakeConfig
}

func GetPrometheusPort() int {
	return config.GetInt("app.prometheus_port", 10000)
}
